Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug with zero ARG_PROVIDER #308

Closed
wants to merge 1 commit into from
Closed

Conversation

al-bezd
Copy link

@al-bezd al-bezd commented Feb 1, 2022

fix bug with zero ARG_PROVIDER

In my case, the provider is set to Null and because of this I cannot get the current coordinates, checking for zero and substituting an empty string solves this problem

fix bug with zero ARG_PROVIDER
@justjcool
Copy link

@al-bezd please format code json[Keys.ARG_PROVIDER] ?? "",

@al-bezd
Copy link
Author

al-bezd commented Feb 4, 2022

@al-bezd , пожалуйста, отформатируйте кодjson[Keys.ARG_PROVIDER] ?? "",

I don't quite understand what I need to do? can you write in more detail?

@frankvollebregt
Copy link

This other open PR achieves essentially the same thing. I think setting an emptry String is not a recommended approach, as it may lead to unexpected behaviour down the line.

Making it nullable instead (like the other PR now does) will also resolve the issue, but in a way that's more logical to understand, I think.

As an aside, I think the other person wanted you to add spaces, so go from json[Keys.ARG_PROVIDER]??"" to json[Keys.ARG_PROVIDER] ?? ""

@al-bezd
Copy link
Author

al-bezd commented Feb 7, 2022

null results in an error, since everything happens on the side of the package, I get nothing but an error

@al-bezd
Copy link
Author

al-bezd commented Feb 7, 2022

This other open PR doesn't solve my problem

@frankvollebregt
Copy link

Oh that's interesting, it logically should work. I'll write up a comment over there then. I see you made a new PR instead of updating this one, so I think you can safely close this PR

@hieudz
Copy link

hieudz commented Jul 30, 2022

pump, facing the same issue where json[Keys.ARG_PROVIDER] is null

@Yukams
Copy link

Yukams commented Jul 30, 2022

Hi @hieudz, you should hop on the version 2 of this lib https://pub.dev/packages/background_locator_2

@hieudz
Copy link

hieudz commented Jul 30, 2022

I've just seen that @Yukams. Thank you so much for your leadership

@Yukams
Copy link

Yukams commented Jul 30, 2022

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants